package com.yami.shop.dao;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.bean.model.*;
import com.yami.shop.common.util.PageAdapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CashOutMapper extends BaseMapper<CashOut> {

    //获取累计收益
    String  getAllIncome(String userId);

    //获取累计金额(通过邀请码)
    String getMoneyByCode(@Param("userId")String userId,@Param("puserId")String puserId);

    //获得所有推广订单
    List<PromoTionOrder> getPromoTionOrder(@Param("userId")String userId);

    //获取子订单
    List<OrderItem> getOrderItem(@Param("orderNumber")String orderNumber);

    //获取该用户所有待结算的订单
    List<PromoTionOrder> getdjsOrder(@Param("userId")String userId);

    //获取用户所有已结算的订单
    List<PromoTionOrder> getyjsOrder(@Param("userId")String userId);

    //获取当前用户已结算的佣金
    List<RebateRecords> getIncomeDetails(@Param("userId")String userId);

    //获得所有的推广商品
    List<PromotionGoods> getPromotionGoods(@Param("shopId")String shopId);

    //获取个人所有的提现记录
    List<CashOut> getWithdrawalRecord(@Param("userId")String userId);

    //获取个人已通过的提现记录
    List<CashOut> getytgWithdrawalRecord(@Param("userId")String userId);

    //获取个人待审核的提现
    List<CashOut> getdshWithdrawalRecord(@Param("userId")String userId);

    //获取最新的推广商品
    List<PromotionGoods> getRecentGoods(@Param("shopId")String shopId);

    //获取最热的推广商品
    List<PromotionGoods> getSellWellGoods(@Param("shopId")String shopId);

    //获取三天后提现记录
    List<CashOut> cashOutItems(@Param("state") Integer state, @Param("lessThanUpdateTime") DateTime lessThanUpdateTime);
}
